﻿<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:ARSS_Common="clr-namespace:ARSS.Common" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	x:Class="ARSS.Editor.AnimationWindow"
	x:Name="Window"
	Title="Animations"
	Width="640" Height="397.5" WindowStyle="ToolWindow" Background="#FF202020" Foreground="White" mc:Ignorable="d" Closing="Window_Closing">

	<Window.Resources>
		<ARSS_Common:SceneDef x:Key="SceneDefDataSource" d:IsDataSource="True"/>
		<DataTemplate x:Key="DataTemplate1">
			<Grid>
				<TextBlock TextWrapping="Wrap" d:LayoutOverrides="Width" Height="Auto" Text="{Binding Key, Mode=Default}" VerticalAlignment="Center"/>
			</Grid>
		</DataTemplate>
		<DataTemplate x:Key="DataTemplate2">
			<Grid>
				<TextBlock Text="{Binding TSec, Mode=Default}" TextWrapping="Wrap" d:LayoutOverrides="Width, Height" VerticalAlignment="Center"/>
			</Grid>
		</DataTemplate>
		<DataTemplate x:Key="TreeViewHeaderTemplate">
			<Grid>
				<TextBlock Foreground="White" Text="{Binding Name}" />
			</Grid>
		</DataTemplate>
		<HierarchicalDataTemplate x:Key="DataTemplate3"
			ItemsSource="{Binding Children}"
			ItemTemplate="{StaticResource TreeViewHeaderTemplate}">
			<TextBlock Foreground="White" Text="{Binding Name}" />
		</HierarchicalDataTemplate>
	</Window.Resources>

	<Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource SceneDefDataSource}}">
		<GroupBox x:Name="groupBox" HorizontalAlignment="Left" Margin="8,8,0,181.5" Width="270" Header="Animation Set">
			<Grid>
				<Button x:Name="NewButton" HorizontalAlignment="Left" Margin="185,92.723,0,0" Width="73" Content="New Set" VerticalAlignment="Top" Height="28" Click="NewButton_Click"/>
				<Button x:Name="DeleteButton" HorizontalAlignment="Left" Margin="185,0,0,2" Width="73" Content="Delete Set" VerticalAlignment="Bottom" Height="28" Click="DeleteButton_Click" IsEnabled="False"/>
				<ListBox x:Name="AnimationSetListBox" Margin="0,8,77,0" ItemsSource="{Binding Animations, Mode=OneWay}" ItemTemplate="{DynamicResource DataTemplate1}" SelectionChanged="AnimationSetListBox_SelectionChanged"/>
			</Grid>
		</GroupBox>
		<GroupBox x:Name="AnimationDataGroupBox" Margin="288.5,7.5,8,10.5" Header="Animation Data" IsEnabled="False" DataContext="{Binding SelectedItem, ElementName=AnimationSetListBox, Mode=Default}" DataContextChanged="AnimationDataGroupBox_DataContextChanged">
			<Grid>
				<TextBlock x:Name="textBlock" HorizontalAlignment="Left" Margin="0,7.992,0,0" VerticalAlignment="Top" TextWrapping="Wrap"><Run Text="Set Name:"/></TextBlock>
				<TextBlock x:Name="textBlock1" Margin="156,43.658,112.983,0" VerticalAlignment="Top" TextWrapping="Wrap" Text="End Time:" d:LayoutOverrides="Width"/>
				<TextBox x:Name="EndTimeTextBox" HorizontalAlignment="Right" Margin="0,40.323,38.406,0" VerticalAlignment="Top" Width="70.577" Text="0" TextWrapping="Wrap" TextChanged="EndTimeTextBox_TextChanged" GotFocus="EndTimeTextBox_GotFocus"/>
				<TextBlock x:Name="textBlock2" HorizontalAlignment="Left" Margin="0,71.277,0,0" TextWrapping="Wrap" Text="Animation Timeline:" VerticalAlignment="Top" Height="14.948"/>
				<Border Margin="0.667,90.225,-0.667,0" VerticalAlignment="Top" Height="19.5" Background="#FFB9B9B9" BorderBrush="Black" BorderThickness="1" CornerRadius="3">
					<Slider x:Name="TimelineSlider" Margin="7,2,7,-1" ValueChanged="TimelineSlider_ValueChanged" GotFocus="TimelineSlider_GotFocus"/>
				</Border>
				<TextBlock x:Name="textBlock3" HorizontalAlignment="Left" Margin="0,44.371,0,0" TextWrapping="Wrap" Text="Current Time:" VerticalAlignment="Top"/>
				<TextBox x:Name="CurrentTimeTextBox" HorizontalAlignment="Left" Margin="71.856,40.387,0,0" Width="70.577" Text="0" TextWrapping="Wrap" VerticalAlignment="Top" TextChanged="CurrentTimeTextBox_TextChanged" GotFocus="CurrentTimeTextBox_GotFocus"/>
				<Button x:Name="PlayButton" HorizontalAlignment="Left" Margin="55.07,123.557,0,0" VerticalAlignment="Top" Width="92.333" Height="33.333" Content="Play" Click="PlayButton_Click"/>
				<Button x:Name="PauseButton" Margin="0,123.557,54.406,0" VerticalAlignment="Top" Height="33.333" Content="Pause" Click="PauseButton_Click" HorizontalAlignment="Right" Width="92.333"/>
				<Button x:Name="CaptureButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="92.333" Height="33.333" Content="Capture Scene" Margin="0,0,38.406,97.89" Click="CaptureButton_Click"/>
				<ListBox x:Name="KeyFrameListBox" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="150" Height="141.223" ItemTemplate="{DynamicResource DataTemplate2}" SelectionChanged="KeyFrameListBox_SelectionChanged" ItemsSource="{Binding Value, Mode=Default}"/>
				<TextBlock x:Name="textBlock2_Copy" HorizontalAlignment="Left" Margin="0.667,0,0,141.223" TextWrapping="Wrap" Text="Animation Key Frames:" VerticalAlignment="Bottom" Height="14.948"/>
				<Button x:Name="DeleteKeyFrameButton" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="92.333" Height="33.333" Content="Delete Key Frame" Margin="0,0,38.406,29.89" Click="DeleteKeyFrameButton_Click" IsEnabled="False"/>
				<TextBlock x:Name="SetNameTextBlock" HorizontalAlignment="Left" VerticalAlignment="Top" Text="{Binding Key, Mode=Default}" TextWrapping="Wrap" Margin="58.07,8,0,0"/>
			</Grid>
		</GroupBox>
		<GroupBox HorizontalAlignment="Left" Margin="8,0,0,10.5" Width="270" Header="Scene Nodes" VerticalAlignment="Bottom" Height="162">
			<Grid Margin="0,0,0,-3.334">
				<Border Margin="-0.667,2.001,94.667,1.333" BorderBrush="Black" BorderThickness="1">
					<TreeView x:Name="SceneNodeTreeView" ItemTemplate="{DynamicResource DataTemplate3}" SelectedItemChanged="SceneNodeTreeView_SelectedItemChanged" Margin="0,3.335,-1,3.665"/>
				</Border>
				<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Text="Positions:" TextWrapping="Wrap" Margin="0,2.001,29.8,0" Width="56.67"/>
				<TextBlock HorizontalAlignment="Right" Margin="0,26.667,76.193,0" VerticalAlignment="Top" Text="X:" TextWrapping="Wrap"/>
				<TextBlock HorizontalAlignment="Right" Margin="0,56,76.193,67.78" Text="Y:" TextWrapping="Wrap" d:LayoutOverrides="Height"/>
				<TextBlock HorizontalAlignment="Right" Margin="0,0,76.193,38.443" VerticalAlignment="Bottom" Text="Z:" TextWrapping="Wrap"/>
				<TextBox x:Name="XPosTextBox" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,22.667,14.756,0" Width="57.437" TextChanged="PositionTextBox_TextChanged"/>
				<TextBox x:Name="YPosTextBox" HorizontalAlignment="Right" Margin="0,52.665,14.756,63.11" Width="57.437" d:LayoutOverrides="Height" TextChanged="PositionTextBox_TextChanged"/>
				<TextBox x:Name="ZPosTextBox" HorizontalAlignment="Right" Margin="0,0,14.756,35.112" VerticalAlignment="Bottom" Width="57.437" TextChanged="PositionTextBox_TextChanged"/>
			</Grid>
		</GroupBox>
	</Grid>
</Window>